import { requestPort } from '@/utils/request.js';

export default {
  //获取需求列表数据
  getDemanList: function (params) {
    return requestPort({
      url: '/api/service/demandList',
      method: 'POST',
      params: params
    });
  },

  //获取需求详情
  getDemandDetail: function (params) {
    return requestPort({
      url: '/api/service/get_demand_id',
      method: 'POST',
      params: params
    });
  },

  //发布任务需求
  addDemand: function (params) {
    return requestPort({
      url: '/api/service/release_task',
      method: 'POST',
      params: params
    });
  },

  //报名参与需求
  setDemand: function (params) {
    return requestPort({
      url: '/api/service/submit_demand',
      method: 'POST',
      params: params
    });
  },

  //报名参与需求
  hireService: function (params) {
    return requestPort({
      url: '/api/service/hire_service',
      method: 'POST',
      params: params
    });
  },

  //我的需求
  getMyDemand: function (params) {
    return requestPort({
      url: '/api/user/mydemandorder',
      method: 'POST',
      params: params
    });
  },

  //关闭需求
  closeDemand: function (params) {
    return requestPort({
      url: '/api/user/close_demand',
      method: 'POST',
      params: params
    });
  },

  //删除需求
  delDemand: function (params) {
    return requestPort({
      url: '/api/user/del_demand',
      method: 'POST',
      params: params
    });
  }
}